package kr.hkit.androidcomplete02.ch12;

import kr.hyunist.androidcomplete01.*;
import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;

public class ListOnlyEx extends ListActivity {
	ArrayAdapter<CharSequence> arList;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	
		arList = ArrayAdapter.createFromResource(this, R.array.country, android.R.layout.simple_expandable_list_item_1);
		
		setListAdapter(arList);
		
	}
	
	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		String text = "Select Item = " + arList.getItem(position);
		Toast.makeText(this, text, Toast.LENGTH_SHORT).show();
	}
}
